package com.shangzhihao.good.controller;

import com.shangzhihao.good.domain.vo.MallGoodsReq;
import com.shangzhihao.good.service.MallService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.xml.transform.Result;
import java.util.List;

/**
 * @Author：尚志豪
 * @Package：com.shangzhihao.good.controller
 * @Project：ruoyi
 * @name：MallController
 * @Date：2024/9/20 12:00
 */
@RestController
@RequestMapping("/mall")
public class MallController {

    @Autowired
    private MallService service;

    /**
     * 列表
     */
    @PostMapping("/list")
    public List<MallGoodsReq> listResult(){
        List<MallGoodsReq> list = service.listResult();
        return list;
    }
    /**
     * 回显
     */
    @PostMapping("/echo")
    public MallGoodsReq echo(@RequestParam Integer id){
        MallGoodsReq list = service.echo(id);
        return list;
    }
}
